[CPU 686]
[BITS 32]

%define EOI 20h
%define PIC1_CMD 20h

[GLOBAL _scancode]

[GLOBAL _kbc_handler]

[SECTION .data]
_scancode: db 0

[SECTION .text]

_kbc_handler:
	push eax

	in al, 60h
	mov byte [_scancode], al
	mov al, EOI
	out PIC1_CMD, al
	pop eax
	
	iretd